#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>

typedef struct stu
{
	int age;
	char name[10];
	int id;
}s;

void input_data(s* p, int age, char* nam, int id)
{
	p->age = age;
	strcpy(p->name, nam);
	p->id = id;
}

void print_data(s* p)
{
	printf("name=%s\nage=%d\nid=%d\n", p->name, p->age, p->id);
}

int main()
{
	s student[2];

	input_data(student, 20, "zhangsan", 46122101);
	print_data(student);
	printf("\n");
	input_data(student+1, 30, "lisi", 46122102);
	print_data(student+1);

	return 0;
}